/**********************************************************
FileName: poll.c
Author: Version : Date: Casiawu(wujh@emsyschina.com)
Description: // 网关 模拟 客户端   2018.6.21
1. -------
History: // 历史修改记
<author> <time> <version > <desc>  asasasa
casiawu 2008/2/12 1.0 build this module for linux (2.6.21)
***********************************************************/
#include <stdio.h>
#include <sys/types.h>  
#include <sys/stat.h>    
#include <errno.h>     
#include <string.h>
#include <stdlib.h>  
#include <unistd.h>  
#include <sys/socket.h>
#include <netinet/tcp.h> 
#include <netinet/in.h>
#include <arpa/inet.h>
#include <pthread.h>

#include "gateway.h"

int main(int argc, char *argv[])
{
	int ret;
	int confd,maxfd;
	char buf[128] = {0};
	fd_set readfs;
	struct timeval timeout={0,1}; 
	pthread_t  cli_pid;
	char sendbuf[128] = "hello world ";
	
	while(1){
		delay(0, 500);
		confd = ClientInit("192.168.0.249", 6666);
		write(confd, sendbuf, strlen(sendbuf));
	}
	if(confd < 0){
		printf("ClientInit error \n");
		return -1;
	}
	printf("client_init success \n");
	
	

	return 0;
}

